package com.jf.test.mvvm.base

import com.fawvw.vehice.netlib.entity.RespEntity

/**
 * @Class: ResponseTools
 * @Description:
 * @author: github.com/jackyflame
 * @Date: 2021/3/12
 */
fun <T> RespEntity<T>.dataConvert():T{
    if(isSucceed){
        return data;
    }else{
        throw Exception("[${errorCode}]${errorMessage}")
    }
}